﻿<prism:VisualStateAwarePage
    x:Class="JV.Com.Views.FlipViewFullScreenPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dvm="using:JV.Com.DesignViewModels"
    xmlns:internals="using:JV.Com.Internals"
    mc:Ignorable="d" x:Name="pageRoot"
    xmlns:converters="using:JV.Com.Converters"
    xmlns:prism="using:Microsoft.Practices.Prism.StoreApps"
    prism:ViewModelLocator.AutoWireViewModel="true">

    <Grid Background="Black" RequestedTheme="Dark">
        <FlipView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Images}"
                  SelectedIndex="{Binding SelectedImageIndex, Mode=TwoWay}">
            <FlipView.ItemTemplate>
                <DataTemplate>
                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <Image Source="{Binding}" Stretch="None" />
                    </ScrollViewer>
                </DataTemplate>
            </FlipView.ItemTemplate>
        </FlipView>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Button  x:Name="backButton" Style="{StaticResource NavigationBackButtonNormalStyle}"
                                 Margin="39,20,39,0" VerticalAlignment="Top"
                                 Command="{Binding GoBackCommand}"
                                 AutomationProperties.Name="Back"
                                 AutomationProperties.AutomationId="BackButton"
                                 AutomationProperties.ItemType="Navigation Button"/>
            <TextBlock x:Name="pageTitle" Text="{Binding PageTitle}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" FontSize="30"
                                VerticalAlignment="Top" Margin="0,10,0,0" IsHitTestVisible="false" TextWrapping="NoWrap" />
            <TextBlock Grid.Column="2" VerticalAlignment="Top" Margin="0,10,39,0" FontSize="30"
                       Style="{StaticResource HeaderTextBlockStyle}">
                <TextBlock.Inlines>
                    <Run Text="{Binding SelectedImagePrintedIndex}" />
                    <Run Text=" / " />
                    <Run Text="{Binding TotalImages}" />
                </TextBlock.Inlines>
            </TextBlock>
        </Grid>
    </Grid>
</prism:VisualStateAwarePage>
